package de.ohmhochschule.bme;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View;

public class GraphicsView extends View {

	public GraphicsView(Context context) {
		super(context);
	}

	@Override
	protected void onDraw(Canvas canvas) {
		setBackgroundColor(Color.BLACK);
		
		Paint cPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
		cPaint.setStyle(Paint.Style.STROKE);
		cPaint.setColor(Color.YELLOW);
		cPaint.setStrokeWidth(1);
		cPaint.setTextSize(24f);

		canvas.drawLine(40, 60, 150, 60, cPaint);
		canvas.drawText("Hi there!", 50, 50, cPaint);
		canvas.drawRect(100, 100, 150, 150, cPaint);
	}
}